package movie;

import java.util.LinkedList;

public class MoviesFilter extends LinkedList<Movie> {

	public LinkedList<Movie> filter(int year, double rating,LinkedList<Movie> movies) {
		LinkedList<Movie> movies_alt=new LinkedList<Movie>();
		for(Movie m:movies){
			if(m.getYear()>=year && m.getRate()>=rating)
				movies_alt.add(m);
		}
			movies=movies_alt;
		return movies;
	}

}
